﻿using DBUtility;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace YiDaShuiHang
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string url="D:/mjq/mmexport1472978287641.jpg";
            //WebRequest webreq = WebRequest.Create(url);
            ////红色部分为文件URL地址，这里是一张图片
            //WebResponse webres = webreq.GetResponse();
            //Stream stream = webres.GetResponseStream();
            //System.Drawing.Image image;
            //image = System.Drawing.Image.FromStream(stream);
            //stream.Close();
            string imgurlfile = System.Configuration.ConfigurationManager.AppSettings["indexPic"];
            //调用CFileUpload类 
            CFileUpload upload = new CFileUpload(url, imgurlfile, false);

            //上传图片文件 
            //bool ret = upload.UploadImage();
        }
    }
}